<%--
  Created by IntelliJ IDEA.
  User: evil
  Date: 16-11-1
  Time: 下午4:42
  注册界面，login.jsp include此页面，作为弹出层的形式
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<div class="modal fade" id="register" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                <h4 class="modal-title" id="myModalLabel">注册账号</h4>
                <span style="color: #FD0002">(原本是想着同学们用学校官网的账号密码登录的,然后我在后台对官网进行爬虫抓取信息
                    ,省着注册了.结果测试后才发现官网的稳定性实在是太差了,根本没法用,登录10次能有1次成功都算多了,没办法,老老实实注册吧...)</span>
            </div>
            <%--内容--%>
            <div class="modal-body">
                <form id="register-form" class="form-horizontal" role="form" enctype="multipart/form-data">
                    <div class="form-group">
                        <label for="register-username" class="col-sm-2 control-label">账号</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="register-username" name="userName"
                                   onkeyup="this.value=this.value.replace(/\D/g,'')"
                                   onafterpaste="this.value=this.value.replace(/\D/g,'')"
                                   placeholder="请输入登录账号(最好是学号)">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="register-userpassword" class="col-sm-2 control-label">密码</label>
                        <div class="col-sm-10">
                            <input type="password" class="form-control" id="register-userpassword" name="userPassword"
                                   onkeyup="value=value.replace(/[\W]/g,'') "
                                   onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
                                   placeholder="请输入密码(仅可输入数字和英文)">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="register-userpassword2" class="col-sm-2 control-label">密码</label>
                        <div class="col-sm-10">
                            <input type="password" class="form-control" id="register-userpassword2" name="userPassword2"
                                   onkeyup="value=value.replace(/[\W]/g,'') "
                                   onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\d]/g,''))"
                                   placeholder="请再次输入密码">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="register-userrealname" class="col-sm-2 control-label">姓名</label>
                        <div class="col-sm-10">
                            <input type="text" class="form-control" id="register-userrealname" name="userRealName"
                                   onkeyup="value=value.replace(/[^\u4E00-\u9FA5]/g,'')"
                                   onbeforepaste="clipboardData.setData('text',clipboardData.getData('text').replace(/[^\u4E00-\u9FA5]/g,''))"
                                   placeholder="请输入真实姓名(后台会审核的,一定要是真实的哦!)">
                        </div>
                    </div>
                    <%--<div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <label for="register-userfile">学生证或其他身份信息(选填)</label>
                            <input id="register-userfile" type="file" name="userFile">
                        </div>
                    </div>--%>

                    <div id="success_reg_dialog" class="alert alert-success" style="width: 90%;margin: auto;display: none">
                        注册成功,三秒后将自动关闭此窗口!
                    </div>
                    <div id="error_reg_dialog" class="alert alert-danger" style="width: 90%;margin: auto;display: none">
                    </div>
                </form>
            </div>
            <%--按钮--%>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">关闭</button>
                <button id="register-submit" type="button" class="btn btn-primary">提交更改</button>
            </div>
        </div>
    </div>
</div>